package com.sofwin.util;

import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @packageName: com.sofwin.util
 * @user: andyliu
 * @date: 2021/9/17 15:59
 * @email 115176513@qq.com
 * @description: TODO
 */

public class DateUtil {
    /**
     * 根据日期格式获取当前时间的字符串
     * @param formatter
     * @return
     */
    public static String getCurrentDateTime(String formatter){
        SimpleDateFormat sdf = new SimpleDateFormat(formatter);
        return sdf.format(new Date());
    }
}
